package es.kivitel.android.sms.kernel;

import java.util.Calendar;

public class BriefEvent {
  public String comment = null;
  public String destination = null;
  public int type = 0;
  public int state = 0;
  public Calendar sendingdate = null;
  private int ID = -1;

  public BriefEvent( String comment,String destination, int type, int state, long sendingDate ) {
	  this.comment = comment;
	  this.destination = destination;
	  this.type = type;
	  this.state = state;
	  this.sendingdate = (Calendar.getInstance());
	  this.sendingdate.setTimeInMillis(sendingDate);
  }

  public int getTypeResource() {
	switch( type ) {
	  case Event.EMAIL_EVENT:
			return android.R.drawable.stat_notify_chat;

	  case Event.SMS_EVENT:
			return android.R.drawable.sym_action_email;

	  case Event.MMS_EVENT:
			return android.R.drawable.stat_notify_chat;
	}
	return 0;//android.R.drawable.ic_delete;
  }

	/**
	 * @return the comment
	 */
	public String getComment() {
		return comment;
	}
	
	/**
	 * @param comment the comment to set
	 */
	public void setComment(String comment) {
		this.comment = comment;
	}
	
	/**
	 * @return the destination
	 */
	public String getDestination() {
		return destination;
	}
	
	/**
	 * @param destination the destination to set
	 */
	public void setDestination(String destination) {
		this.destination = destination;
	}
	
	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}
	
	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}
	
	/**
	 * @return the state
	 */
	public int getState() {
		return state;
	}
	
	/**
	 * @param state the state to set
	 */
	public void setState(int state) {
		this.state = state;
	}
	
	/**
	 * @return the sendingdate
	 */
	public Calendar getSendingdate() {
		return sendingdate;
	}
	
	/**
	 * @param sendingdate the sendingdate to set
	 */
	public void setSendingdate(Calendar sendingdate) {
		this.sendingdate = sendingdate;
	}
	
	public int getStateResource() {
		switch(state){
		case Event.EVENT_SENT:
			return android.R.drawable.presence_online;
		case Event.EVENT_NOT_SENT:
			return android.R.drawable.presence_busy;
		}
		return android.R.drawable.ic_delete;
	}

	public void setID(int iD) {
		ID = iD;
	}

	public int getID() {
		return ID;
	}
}
